3.490 \(\int x^2 \sqrt {1+x} \sqrt {1-x+x^2} \, dx\)

Optimal. Leaf size=23 \[ \frac {2}{9} (x+1)^{3/2} \left (x^2-x+1\right )^{3/2} \]

[Out]

2/9*(1+x)^(3/2)*(x^2-x+1)^(3/2)

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 23, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.043, Rules used = {913} \[ \frac {2}{9} (x+1)^{3/2} \left (x^2-x+1\right )^{3/2} \]

Antiderivative was successfully verified.

[In]

Int[x^2*Sqrt[1 + x]*Sqrt[1 - x + x^2],x]

[Out]

(2*(1 + x)^(3/2)*(1 - x + x^2)^(3/2))/9

Rule 913

Int[(x_)^2*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[((d + e*x)^
(m + 1)*(a + b*x + c*x^2)^(p + 1))/(c*e*(m + 2*p + 3)), x] /; FreeQ[{a, b, c, d, e, m, p}, x] && EqQ[b*e*(m +
p + 2) + 2*c*d*(p + 1), 0] && EqQ[b*d*(p + 1) + a*e*(m + 1), 0] && NeQ[m + 2*p + 3, 0]

Rubi steps

\begin {align*} \int x^2 \sqrt {1+x} \sqrt {1-x+x^2} \, dx &=\frac {2}{9} (1+x)^{3/2} \left (1-x+x^2\right )^{3/2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 23, normalized size = 1.00 \[ \frac {2}{9} (x+1)^{3/2} \left (x^2-x+1\right )^{3/2} \]

Antiderivative was successfully verified.

[In]

Integrate[x^2*Sqrt[1 + x]*Sqrt[1 - x + x^2],x]

[Out]

(2*(1 + x)^(3/2)*(1 - x + x^2)^(3/2))/9

________________________________________________________________________________________

fricas [A]  time = 1.02, size = 22, normalized size = 0.96 \[ \frac {2}{9} \, {\left (x^{3} + 1\right )} \sqrt {x^{2} - x + 1} \sqrt {x + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(1+x)^(1/2)*(x^2-x+1)^(1/2),x, algorithm="fricas")

[Out]

2/9*(x^3 + 1)*sqrt(x^2 - x + 1)*sqrt(x + 1)

________________________________________________________________________________________

giac [B]  time = 0.24, size = 67, normalized size = 2.91 \[ \frac {2}{315} \, {\left ({\left (5 \, {\left (7 \, x - 23\right )} {\left (x + 1\right )} + 258\right )} {\left (x + 1\right )} - 213\right )} \sqrt {{\left (x + 1\right )}^{2} - 3 \, x} \sqrt {x + 1} + \frac {2}{105} \, {\left (3 \, {\left (5 \, x - 12\right )} {\left (x + 1\right )} + 71\right )} \sqrt {{\left (x + 1\right )}^{2} - 3 \, x} \sqrt {x + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(1+x)^(1/2)*(x^2-x+1)^(1/2),x, algorithm="giac")

[Out]

2/315*((5*(7*x - 23)*(x + 1) + 258)*(x + 1) - 213)*sqrt((x + 1)^2 - 3*x)*sqrt(x + 1) + 2/105*(3*(5*x - 12)*(x
+ 1) + 71)*sqrt((x + 1)^2 - 3*x)*sqrt(x + 1)

________________________________________________________________________________________

maple [A]  time = 0.00, size = 18, normalized size = 0.78 \[ \frac {2 \left (x +1\right )^{\frac {3}{2}} \left (x^{2}-x +1\right )^{\frac {3}{2}}}{9} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(x+1)^(1/2)*(x^2-x+1)^(1/2),x)

[Out]

2/9*(x+1)^(3/2)*(x^2-x+1)^(3/2)

________________________________________________________________________________________

maxima [A]  time = 0.95, size = 22, normalized size = 0.96 \[ \frac {2}{9} \, {\left (x^{3} + 1\right )} \sqrt {x^{2} - x + 1} \sqrt {x + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(1+x)^(1/2)*(x^2-x+1)^(1/2),x, algorithm="maxima")

[Out]

2/9*(x^3 + 1)*sqrt(x^2 - x + 1)*sqrt(x + 1)

________________________________________________________________________________________

mupad [B]  time = 2.62, size = 22, normalized size = 0.96 \[ \frac {2\,\left (x^3+1\right )\,\sqrt {x+1}\,\sqrt {x^2-x+1}}{9} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(x + 1)^(1/2)*(x^2 - x + 1)^(1/2),x)

[Out]

(2*(x^3 + 1)*(x + 1)^(1/2)*(x^2 - x + 1)^(1/2))/9

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int x^{2} \sqrt {x + 1} \sqrt {x^{2} - x + 1}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(1+x)**(1/2)*(x**2-x+1)**(1/2),x)

[Out]

Integral(x**2*sqrt(x + 1)*sqrt(x**2 - x + 1), x)

________________________________________________________________________________________